<template>
    <div class="welcome-container">
        <img src="../assets/icons/logo.svg" alt="Logo" class="logo" />
        <h1 class="welcome-title">欢迎使用</h1>
        <p class="welcome-subtitle">这是一个Vue3+TS+Electron空项目</p>
        <h1>{{ store.count }}</h1>
        <div class="welcome-actions">
            <button class="btn-primary" @click="increase">+ 1</button>
            <button class="btn-secondary" disabled>{{ store.doubleCount }}</button>
        </div>
    </div>
</template>

<script setup lang="ts">
// 引入store
import { exampleStore } from '../stores/example'

const store = exampleStore()





const increase = () => {
    store.add()
}


</script>

<style scoped lang="less">

*{
    white-space: nowrap;
}
.welcome-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 20px;
}

.logo {
    width: 150px;
    height: 150px;
    margin-bottom: 30px;
    animation: fadeIn 1s ease-in-out;
}

.welcome-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.welcome-subtitle {
    font-size: 1.2rem;
    color: #b8c6db;
    margin-bottom: 40px;
    text-align: center;
}

.welcome-actions {
    display: flex;
    gap: 20px;
}

.btn-primary {
    padding: 12px 30px;
    background-color: #646ff0;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
        background-color: #4a54e1;
        transform: translateY(-2px);
    }
}

.btn-secondary {
    padding: 12px 30px;
    background-color: transparent;
    color: white;
    border: 1px solid white;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    cursor: not-allowed;

    &:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
</style>
